Skip to content

Comments

hooks: update motd handling and remove 50-motd-news#118

Open
mvo5 wants to merge 3 commits intocanonical:masterfrom
mvo5:motd-extra-careful
Open

hooks: update motd handling and remove 50-motd-news#118
mvo5 wants to merge 3 commits intocanonical:masterfrom
mvo5:motd-extra-careful

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Sep 7, 2020

The base-files package grew a new /etc/update-motd.d/50-motd-news
script during the lifetime of Core 16. This script wants to write
to the non-writable /var/cache/motd-news location and also needs
curl to work. So it fails and that leads to breaking the
/etc/update-motd.d/00-header script.

This commit disables the script and also adds a check to ensure
that no new files are added to /etc/update-motd.d without us
noticing.

The base-files package grew a new /etc/update-motd.d/50-motd-news
script during the lifetime of Core 16. This script wants to write
to the non-writable /var/cache/motd-news location and also needs
curl to work. So it fails and that leads to breaking the
/etc/update-motd.d/00-header script.

This commit disables the script and also adds a check to ensure
that no new files are added to /etc/update-motd.d without us
noticing.
@mvo5 mvo5 force-pushed the motd-extra-careful branch from e8ef7ea to 0cb5b93 Compare September 7, 2020 08:39
The update to base-files in LP:1888575 leaves an empty

    /etc/default/motd-news.wasremoved

file around. This file is not needed and also misleading
because the file was never around so it was never removed.

See
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1888575/comments/21
for more details.

This commit just removes this (empty) file.
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detail

rm /etc/update-motd.d/10-help-text

# fail if anything in update-motd.d changed so that we can inspect/update
if [ "$(find /etc/update-motd.d/ -type f | wc -l)" != 2 ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not quite a content change check, if a file is replaced it will pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks for this! I updated the test now to actually look at the content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants